// == Submit Booking Data ============================================================================================== // Check fields at form and then send request function mybooking_submit( submit_form , bk_type, wpdev_active_locale){ var target_elm = jQuery( ".booking_form_div" ).trigger( "booking_form_submit_click", [bk_type, submit_form, wpdev_active_locale] ); //FixIn: 8.8.3.13 if ( ( jQuery( target_elm ).find( 'input[name="booking_form_show_summary"]' ).length > 0 ) && ( 'pause_submit' === jQuery( target_elm ).find( 'input[name="booking_form_show_summary"]' ).val() ) ) { return false; } //FixIn: 8.4.0.2 var is_error = wpbc_check_errors_in_booking_form( bk_type ); if ( is_error ) { return false; } // Show message if no selected days in Calendar(s) if (document.getElementById('date_booking' + bk_type).value == '') { var arr_of_selected_additional_calendars = wpbc_get_arr_of_selected_additional_calendars( bk_type ); //FixIn: 8.5.2.26 if ( arr_of_selected_additional_calendars.length == 0 ) { wpbc_front_end__show_message__error_under_element( '#booking_form_div' + bk_type + ' .bk_calendar_frame', _wpbc.get_message( 'message_check_no_selected_dates' ), 3000 ); return; } } var count = submit_form.elements.length; var formdata = ''; var inp_value; var element; var el_type; //FixIn:6.1.1.3 if( typeof( wpbc_is_this_time_selection_not_available ) == 'function' ) { if ( document.getElementById('date_booking' + bk_type).value == '' ) { // Primary calendar not selected. if ( document.getElementById('additional_calendars' + bk_type ) != null ) { // Checking additional calendars. var id_additional_str = document.getElementById('additional_calendars' + bk_type).value; //Loop have to be here based on , sign var id_additional_arr = id_additional_str.split(','); var is_times_dates_ok = false; for ( var ia=0;ia